<!DOCTYPE html>
<img id="image" src="../capybara.jpg"/>
<script>
imgLoaded = false;
var img = document.getElementById("image");
img.onload = () => { imgLoaded = true; }
</script>
